<?php

/**
* @package      auto_occasion
* @subpackage   commun
* @version      1
* @author       CMS
*/


/**
* Zone affichant le bloc pour la restriction des entreprises par région ou département
*
* @package auto_occasion
* @subpackage commun
*/
class FoEntrepriseRestrictZone extends jZone {
 
    protected $_tplname='entreprise~FoEntrepriseRestrict.zone';

    /**
    * Chargement des données pour affichage
    */
    protected function _prepareTpl(){

        jClasses::inc("entreprise~entrepriseSrv");
        jClasses::inc("commun~common");

        $region          = $this->getParam('region');
        $type            = $this->getParam('type');
        $departement     = $this->getParam('departement');
        $deptNum         = $this->getParam('deptNum');
        $deptId          = $this->getParam('deptId');
        $ville           = $this->getParam('ville');
        $villeNom        = $this->getParam('villeNom');
 
        $dept            = entrepriseSrv::getDepartement($departement);
        $deptNom         = common::chargeparId($deptId,'ao_departement');
        $marqueEnAvant   = entrepriseSrv::getMarqueMiseEnAvant($departement);

        $this->_tpl->assign('region', $region);
        $this->_tpl->assign('type', $type);
        $this->_tpl->assign('dept', $dept);
        $this->_tpl->assign('deptId', $deptId);
        $this->_tpl->assign('deptNum', $deptNum);
        $this->_tpl->assign('deptNom', $deptNom);
        $this->_tpl->assign('villeNom',$villeNom);
        $this->_tpl->assign('ville', $ville);
        $this->_tpl->assign('marqueEnAvant', $marqueEnAvant);
    }
}    